package enums;


/**
 * @Desciption: 系统异常码
 * @author: Anc
 * @date: 2022/07/01
 */
public enum BaseRespCodeEnum implements RespCodeEnum {

    SUC(100000, "请求成功"),
    SERVER_ERROR(100001, "服务异常"),
    PARAMS_ILLEGAL(100002, "参数非法"),
    REQUEST_BLOCKED(100003, "请求过于频繁，请稍后再试"),
    NOT_FOUND(100004, "资源不存在"),
    REQUEST_DEGRADE(100005, "资源不存在"),
    REMOTE_THIRD_EXCEPTION(100006, "远程调用第三方异常"),
    ;

    private int code;

    private String msg;

    BaseRespCodeEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    @Override
    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
